package com.aspose.cells.a.d;

public class zcg {
   public static zn a(com.aspose.cells.b.a.b.zo[] var0, boolean var1) {
      zn var2 = new zn();
      zo var3 = zo.a(var0, var1);
      var2.a((zl)var3);
      return var2;
   }

   public static zn a(com.aspose.cells.b.a.b.zo[][] var0, boolean var1) {
      zn var2 = new zn();

      for(int var3 = 0; var3 < var0.length; ++var3) {
         zo var4 = zo.a(var0[var3], var1);
         var2.a((zl)var4);
      }

      return var2;
   }

   public static zn a(com.aspose.cells.b.a.b.zo[] var0) {
      zn var1 = new zn();
      zo var2 = zo.a(var0);
      var1.a((zl)var2);
      return var1;
   }

   public static zn a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2) {
      zn var3 = new zn();
      zo var4 = new zo();
      var3.a((zl)var4);
      za var5 = d(var0, var1, var2);
      var4.a(var5.a());
      var4.a((zl)var5);
      return var3;
   }

   public static zn a(com.aspose.cells.b.a.b.zq var0) {
      zn var1 = new zn();
      zo var2 = new zo();
      var1.a((zl)var2);
      za var3 = d(var0, com.aspose.cells.b.a.b.zo.a(), com.aspose.cells.b.a.b.zo.a());
      var2.a(var3.a());
      var2.a((zl)var3);
      return var1;
   }

   public static zn b(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2) {
      zn var3 = new zn();
      zo var4 = new zo();
      var3.a((zl)var4);
      za var5 = d(var0, var1, var2);
      var4.a(var5.a());
      var4.a((zl)var5);
      zq var6 = new zq();
      com.aspose.cells.b.a.a.ze.a(var6.a(), (Object)var5.i());
      com.aspose.cells.b.a.a.ze.a(var6.a(), (Object)var4.a());
      var4.a((zl)var6);
      var4.a(true);
      return var3;
   }

   public static zn c(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2) {
      zn var3 = new zn();
      zo var4 = new zo();
      var3.a((zl)var4);
      za var5 = d(var0, var1, var2);
      var4.a(var5.a());
      var4.a((zl)var5);
      zq var6 = new zq();
      com.aspose.cells.b.a.a.ze.a(var6.a(), (Object)var4.a());
      var4.a((zl)var6);
      return var3;
   }

   public static zn a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zt var1) {
      zn var2 = new zn();
      zo var3 = new zo();
      var2.a((zl)var3);
      com.aspose.cells.b.a.b.zt var4 = new com.aspose.cells.b.a.b.zt(var1.b() / 2.0F, var1.c() / 2.0F);
      var3.a(new com.aspose.cells.b.a.b.zo(var0.j() + var4.b(), var0.k()));
      zq var5 = new zq();
      com.aspose.cells.b.a.a.ze.a(var5.a(), (Object)(new com.aspose.cells.b.a.b.zo(var0.l() - var4.b(), var0.k())));
      var3.a((zl)var5);
      za var6 = d(new com.aspose.cells.b.a.b.zq(var0.l() - var1.b(), var0.k(), var1.b(), var1.c()), new com.aspose.cells.b.a.b.zo(var0.l() - var4.b(), var0.k()), new com.aspose.cells.b.a.b.zo(var0.l(), var0.k() + var4.c()));
      var3.a((zl)var6);
      zq var7 = new zq();
      com.aspose.cells.b.a.a.ze.a(var7.a(), (Object)(new com.aspose.cells.b.a.b.zo(var0.l(), var0.m() - var4.c())));
      var3.a((zl)var7);
      za var8 = d(new com.aspose.cells.b.a.b.zq(var0.l() - var1.b(), var0.m() - var1.c(), var1.b(), var1.c()), new com.aspose.cells.b.a.b.zo(var0.l(), var0.m() - var4.c()), new com.aspose.cells.b.a.b.zo(var0.l() - var4.b(), var0.m()));
      var3.a((zl)var8);
      zq var9 = new zq();
      com.aspose.cells.b.a.a.ze.a(var9.a(), (Object)(new com.aspose.cells.b.a.b.zo(var0.j() + var4.b(), var0.m())));
      var3.a((zl)var9);
      za var10 = d(new com.aspose.cells.b.a.b.zq(var0.j(), var0.m() - var1.c(), var1.b(), var1.c()), new com.aspose.cells.b.a.b.zo(var0.j() + var4.b(), var0.m()), new com.aspose.cells.b.a.b.zo(var0.j(), var0.m() - var4.c()));
      var3.a((zl)var10);
      zq var11 = new zq();
      com.aspose.cells.b.a.a.ze.a(var11.a(), (Object)(new com.aspose.cells.b.a.b.zo(var0.j(), var0.k() + var4.c())));
      var3.a((zl)var11);
      za var12 = d(new com.aspose.cells.b.a.b.zq(var0.j(), var0.k(), var1.b(), var1.c()), new com.aspose.cells.b.a.b.zo(var0.j(), var0.k() + var4.c()), new com.aspose.cells.b.a.b.zo(var0.j() + var4.b(), var0.k()));
      var3.a((zl)var12);
      return var2;
   }

   private static za d(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2) {
      com.aspose.cells.b.a.b.zt var3 = new com.aspose.cells.b.a.b.zt(var0.h() / 2.0F, var0.i() / 2.0F);
      com.aspose.cells.b.a.b.zo var4 = new com.aspose.cells.b.a.b.zo(var0.f() + var3.b(), var0.g() + var3.c());
      float var5 = (float)Math.atan2((double)(var4.e() - var1.e()), (double)(var1.d() - var4.d()));
      float var6 = (float)Math.atan2((double)(var4.e() - var2.e()), (double)(var2.d() - var4.d()));
      za var7 = new za();
      var7.a(var0.d());
      var7.a(var0.e());
      var7.a((float)zbv.b((double)(-var5)));
      if (var6 < var5) {
         var6 += 6.2831855F;
      }

      float var8 = var6 - var5;
      if (var8 == 0.0F) {
         var7.b(360.0F);
      } else {
         var7.b((float)zbv.b((double)(-var8)));
      }

      return var7;
   }
}
